Current Location: Home> Function Categories> expm1

expm1

Returns exp(number) - 1, and can calculate the exact result even when the value of number is close to zero.
Name:expm1
Category:math
Programming Language:php
One-line Description:Returns the value of -1 to the power of E.

Definition and usage

expm1() function returns exp(x) - 1, and can calculate the exact result even when the value of number is close to zero.

Example

In this example, we will apply the expm1() function to different numbers:

 <?php
echo ( expm1 ( 1 ) ) ;
echo ( expm1 ( - 1 ) ) ;
echo ( expm1 ( 5 ) ) ;
echo ( expm1 ( 10 ) )
?>

Try it yourself

grammar

 expm1 ( x )
parameter describe
x Required. A number.

illustrate

expm1() returns 'exp(x) - 1', and the accurate result can be calculated even when the value of x is close to zero. But when two values ​​approach equal, 'exp (x) - 1' becomes inaccurate.

Similar Functions